<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>

<script>
    // 原型
    let obj = [2,2,3]
    console.log(obj) // true
    Array.prototype.name = function(name,num){
        console.log(name);
        let value = name.indexOf(num)
        console.log(value);
        
    }
    console.log(obj.name(obj,3));
    
</script>
</body>
</html>